package com.example.wlzz.utils;
import com.example.wlzz.vo.WebSocketResultVO;
/**
 * Created by 楠尼玛
 * 2018-03-31
 */
public class WebSocketResultVOUtil {

    public static WebSocketResultVO success(Object object,int flag) {
        WebSocketResultVO resultVO = new WebSocketResultVO();
        resultVO.setData(object);
        resultVO.setCode(0);
        resultVO.setMsg("success");
        resultVO.setFlag(flag);
        return resultVO;
    }
    public static WebSocketResultVO success(int flag) {
        WebSocketResultVO resultVO = new WebSocketResultVO();
        resultVO.setCode(0);
        resultVO.setMsg("success");
        resultVO.setFlag(flag);
        return resultVO;
    }
    public static WebSocketResultVO error(int code, String msg,int flag) {
        WebSocketResultVO resultVO = new WebSocketResultVO();
        resultVO.setCode(code);
        resultVO.setMsg(msg);
        resultVO.setFlag(flag);
        return resultVO;
    }
}